package springdoc.web;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.Tag;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping(value = "/api/v1")
/**
 * 注意这里与springdoc-openapi-ui的有所不同
 * @Tag
 */
@Api(tags = "Nelson Mandela", value = "The greatest glory in living lies not in never falling, but in rising every time we fall.")
public class TestController {

    /**
     * swagger2 只用@ApiParam
     * @param tgtLan
     * @param projectId
     */
    @ApiOperation(value = "Get string segment")
    @GetMapping(value = "/string/project/{projectId}/segment")
    public void getTestInfo(@ApiParam(value = "目标语言", required = true)
                            @RequestParam(value = "tgt_lan") String tgtLan, @PathVariable String projectId) {
    }

    @ApiOperation(value = "Add string segment")
    @PostMapping(value = "/string/project/{projectId}/segment")
    public void addTestInfo(@PathVariable String projectId, @RequestBody List<String> list) {
    }

    @ApiOperation(value = "Delete string segment")
    @DeleteMapping(value = "/string/project/{projectId}/segment")
    public void getTestInfo(@PathVariable String projectId, @RequestBody List<String> list) {
    }
}
